package org.example.server;

import org.springframework.stereotype.Service;

import java.util.concurrent.atomic.AtomicLong;

@Service
public class PacketNoService {

    private long lastTimestamp = System.currentTimeMillis();
    private AtomicLong idx = new AtomicLong(0);

    public long nextNo() {
        //TODO 有bug，需要使用全局id递增器
        return idx.incrementAndGet();
    }
}
